import request from '@/utils/request'
import { AxiosPromise } from 'axios'
import { AnalyseData, AnalyseQueryVO } from '../api/types'

/**
 * 查询历史数据
 * @param query
 * @returns {*}
 */
export const queryData = (query?: AnalyseQueryVO): AxiosPromise<AnalyseData> => {
  return request({
    url: '/device/deviceProperty/log/list2',
    method: 'post',
    data: query,
  })
}

/**
 * 查询测试单详细
 * @param id
 */
export const getDemo = (id: string | number): AxiosPromise<AnalyseQueryVO> => {
  return request({
    url: '/demo/demo',
    method: 'post',
    data: {
      id,
    },
  })
}
